﻿<?php
function connect(){
	mysql_connect('localhost','root','');
	mysql_select_db('pamam');
	mysql_set_charset("utf8");
	mysql_query("SET NAMES utf8"); 
	mysql_query("SET CHARACTER_SET utf8");  
}

function generatepassword(){
	$passlength=rand(5,10);
	$pass='';
	$alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
	for ($i=0; $i<$passlength; $i++){
		$pass=$pass.$alphabet[rand(0,61)];
	}
	return $pass;
}
?>